<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let lizhanyu = {
      uname: `李占宇`,
      age: 26,
      gander: `man`,
      add: `鄱阳县枫树下村`,
      singSong: function () {
        document.write(`配乐：DJ凤舞九天<br>`)
      },         //  属性跟属性之间，方法跟方法之间都是用逗号隔开
      dance: function () {
        document.write(`热辣钢管舞`)
      }
    }


    // 遍历对象
    // for (let k in lizhanyu) {
    //   console.log(k);  //    打印的是属性名
    //   console.log(lizhanyu[k]);  //     打印的属性值   因为k是变量，所以需要用[]包起来
    // }
   for(let k in lizhanyu){
    console.log(k);
    console.log(lizhanyu[k]);
   }

      
  </script>
</body>

</html>